import 'package:get/get.dart';
import 'package:yt_devops/components/log_utils.dart';

class VoltageCurrentFullChartController extends GetxController {
    List<dynamic> maxVoltage = [];//最高允许充电电压
    List<dynamic> needVoltage = [];//需求电压
    List<dynamic> outVoltage = [];//充电输出电压
    List<dynamic> bmsVoltage = [];//BMS测量电压
    List<dynamic> needCurrent = [];//需求电流
    List<dynamic> maxCurrent = [];//最高允许充电电流
    List<dynamic> outCurrent = [];//充电输出电流
    List<dynamic> bmsCurrent = [];//BMS测量电流
    @override
    void onInit() {
    super.onInit();
    if (Get.arguments != null) {
        if (Get.arguments['maxVoltage'] != null) {
            maxVoltage = Get.arguments['maxVoltage'];
        }
        if (Get.arguments['needVoltage'] != null) {
            needVoltage = Get.arguments['needVoltage'];
        }
        if(Get.arguments['outVoltage']!=null){
            outVoltage = Get.arguments['outVoltage'];
        }
        if(Get.arguments['bmsVoltage']!=null){
            bmsVoltage = Get.arguments['bmsVoltage'];
        }
        if(Get.arguments['needCurrent']!=null){
            needCurrent = Get.arguments['needCurrent'];
        }
        if(Get.arguments['maxCurrent']!=null){
            maxCurrent = Get.arguments['maxCurrent'];
        }
        if(Get.arguments['outCurrent']!=null){
            outCurrent = Get.arguments['outCurrent'];
        }
        if(Get.arguments['bmsCurrent']!=null){
            bmsCurrent = Get.arguments['bmsCurrent'];
        }
        Log.d('needCurrent==' + needCurrent.toString());
    }
    }

    @override
    void onReady() {}

    @override
    void onClose() {}

}
